package com.service.business.conversion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.service.business.base.dto.LoginUserSession;
import com.service.business.conversion.controller.rep.ConvertPageRep;
import com.service.business.conversion.controller.req.ConversionReq;
import com.service.core.rest.request.PageRequest;
import com.service.core.rest.response.CommonPageRep;
import com.service.dao.enums.CoinsEnum;
import com.service.dao.model.ConvertCoinsRecord;
import com.service.dao.model.MemberStore;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Map;


/**
 * 货币合成(兑换)记录详情
 *
 * @author xxxx
 * @email xxxx@qq.com
 * @date 2019-12-12 15:29:36
 */
public interface ConvertCoinsRecordService extends IService<ConvertCoinsRecord> {

    void convertCoin(ConversionReq conversionReq, LoginUserSession session);

    CommonPageRep<ConvertPageRep> pageRecord(CoinsEnum coin, PageRequest pageRequest);

    /**
     * 获取某会员某天累计合成数量
     * @param memberId
     * @param someday
     * @return
     */
    BigDecimal getTotalConversionNum(Integer memberId, CoinsEnum coinsEnum, LocalDate someday);
}

